package iha.auh.kds.aba.painratingapp;

import iha.auh.kds.aba.painratingapp.Models.ChildModel;

public class ChildSingleton {
	private static ChildSingleton instance = null;
	
	private static ChildModel _child;
	
	public static ChildModel getChild() {
		getInstance();
		return ChildSingleton._child;
	}
	
	public static void setChild(ChildModel child) {
		getInstance();
		_child = child;
	}
	
	protected ChildSingleton() {
		_child = new ChildModel();
	}
	
	public static ChildSingleton getInstance() {
		if (instance == null) {
			instance = new ChildSingleton();
		}
		
		return instance;
	}
	
	public static void clear() {
		if (instance != null)
			instance = null;
	}
}
